<?php
use yii\bootstrap\ActiveForm;
?>
<link rel="stylesheet" href="/static/dist/css/AdminLTE.min.css" type="text/css">
<link rel="stylesheet" href="/static/bootstrap/css/bootstrap.min.css" type="text/css">
<link rel="stylesheet" href="/static/plugins/datatables/jquery.dataTables.css" type="text/css">
<link rel="stylesheet" href="/static/css/admin.css" type="text/css">
<link rel="stylesheet" href="/static/jBox/Skins/Metro/jbox.css" type="text/css">
<link rel="stylesheet" href="/static/plugins/daterangepicker/daterangepicker.css" type="text/css">
<link rel="stylesheet" href="/static/plugins/datepicker/datepicker3.css" type="text/css">

<style>
    .dataTables_length{
        margin-top: 10px;
    }
    .dataTable>tbody>tr>td{
        vertical-align: middle;
        font-size: 0.8em;
        padding: 8px 18px;
    }
    .dataTable>thead>tr>th{
        vertical-align: middle;
        font-size: 0.8em;
    }
</style>
<div class="tabs-panel">
    <div class="row">
        <div class="col-xs-12">
            <div class="box">
                <div class="box-header">
                    <!--<h3 class="box-title">Hover Data Table</h3>-->
                    <label>名称：</label>
                    <input class="depart-input" name="search_config_title" id="search_config_title" type="text" placeholder="" style="width: 150px">&nbsp;

                    <label>分组：</label>
                    <select id="search_config_group_name" name="search_config_group_name" class="depart-input" style="width: 150px">
                        <option value="">请选择</option>
                        <?php foreach($group as $value){?>
                            <option value="<?= $value['config_group_name']?>"><?= $value['config_group_name']?></option>
                        <?php }?>
                    </select>&nbsp;
                    <button type="button" class="btn btn-primary depart-modal" id="select_button" style="width: 100px;">查询</button> &nbsp;
                    <button type="button" class="btn btn-warning depart-modal" id="reset_button" style="width: 100px;">重置</button>
                </div>
                <!-- /.box-header -->
                <div class="box-body">
                    <button type="button" class="btn btn-success depart-modal" id="add_button" style="width: 100px;">添加</button>
                    <table id="table_list" class="display" style="white-space: nowrap; ">
                        <thead>
                        <tr>
                            <th style="width: 20px">操作</th>
                            <th style="width: 5px">ID</th>
                            <th style="width: 20px">名称</th>
                            <th style="width: 15px">KEY</th>
                            <th style="width: 25px">VALUE</th>
                            <th style="width: 10px">组</th>
                            <th style="width: 10px">排序</th>
                            <th style="width: 20px">备注</th>
                            <th style="width: 20px"><?=TITLE_STATUS?></th>
                        </tr>
                        </thead>
                        <tbody></tbody>
                    </table>
                </div>
            </div>
        </div>
    </div>
</div>

<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
                    &times;
                </button>
                <h4 class="modal-title" id = "myModalLabel" name = "myModalLabel">
                    添加系统设置
                </h4>
            </div>
            <div class="modal-body">
                <form action="/sys-setting/save-config" method="post" id="config_form">
                    <div class="box-body">
                        <div class="form-group">
                            <label for="brand_name">名称</label>
                            <input type="text" style="width: 50%;" class="form-control" name="config_title" id="config_title" placeholder="名称">
                        </div>

                        <div class="form-group">
                            <label for="brand_desc">KEY</label>
                            <input type="text" style="width: 50%;" class="form-control" name="config_key" id="config_key" placeholder="KEY">
                        </div>

                        <div class="form-group">
                            <label for="brand_desc">VALUE</label>
                            <input type="text" style="width: 50%;" class="form-control" name="config_value" id="config_value" placeholder="VALUE">
                        </div>

                        <div class="form-group">
                            <label for="exampleInputEmail1">分组</label>
                            <select name="config_group_name" id="config_group_name" class="form-control" style="width: 30%;">
                                <option value="">请选择分组</option>
                                <?php foreach($group as $value){?>
                                    <option value="<?=$value['config_group_id']?>"><?=$value['config_group_name']?></option>
                                <?php }?>
                                <option value="_new_">新建分组</option>
                            </select>
                            <input type="text" style="width: 50%;display:none;margin-top: 10px;" class="form-control" name="new_config_group_name" id="new_config_group_name" placeholder="分组名称" >
                            <input type="text" style="width: 50%;display:none;margin-top: 10px;" class="form-control" name="new_config_group_id" id="new_config_group_id" placeholder="分组ID" >
                        </div>

                        <div class="form-group">
                            <label for="brand_desc">排序</label>
                            <input type="text" style="width: 50%;" class="form-control" name="sort" id="sort" placeholder="排序" value="1">
                        </div>

                        <div class="form-group">
                            <label for="exampleInputPassword1">备注</label>
                            <textarea class="form-control" name="memo" id="memo" rows="3" placeholder="" ></textarea>
                        </div>

                        <div class="form-group">
                            <label for="exampleInputEmail1">状态</label>
                            <select name="use_flg" id="use_flg" class="form-control" style="width: 30%;">
                                <option value="1">启用</option>
                                <option value="0">禁用</option>
                            </select>
                        </div>
                    </div>
                    <input type="hidden" name="config_id" id="config_id">
                    <!-- /.box-body -->
                </form>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                <a type="button" class="btn btn-primary ajax_submit">提交</a>
            </div>
        </div><!-- /.modal-content -->
    </div><!-- /.modal -->
</div>
<!-- 固定js -->
<script type="text/javascript" src="/static/plugins/jQuery/jquery-2.2.3.min.js"></script>
<script type="text/javascript" src="/static/bootstrap/js/bootstrap.min.js"></script>
<script type="text/javascript" src="/static/plugins/datatables/jquery.dataTables.min.js"></script>
<script type="text/javascript" src="/static/plugins/datatables/dataTables.bootstrap.min.js"></script>
<script type="text/javascript" src="/static/jBox/jquery.jBox-2.3.min.js"></script>
<script type="text/javascript" src="/static/jBox/i18n/jquery.jBox-zh-CN.js"></script>
<!--图片上传插件用-->
<script type="text/javascript" src="/static/plugins/jquery.form.js"></script>
<!--图片显示用-->
<script type="text/javascript" src="/static/plugins/layer/layer.js"></script>
<!-- 自定义js -->
<script type="text/javascript" src="/static/app/global.js?version=<?=Yii::$app->params['version']?>"></script>
<script type="text/javascript" src="/static/app/sys-setting/index.js?version=<?=Yii::$app->params['version']?>"></script>